package com.aspose.cells;

public class CellsColor {
   private Workbook b;
   zakp a;

   CellsColor(Workbook book) {
      this.b = book;
      this.a = new zakp(false);
   }

   CellsColor(Workbook book, zakp color) {
      this.b = book;
      this.a = color;
   }

   public boolean isShapeColor() {
      return this.a.c();
   }

   public void setShapeColor(boolean value) {
      this.a.b(value);
   }

   public int getType() {
      return this.a.b();
   }

   public ThemeColor getThemeColor() {
      if (this.getType() == 4) {
         int var1 = zsk.c(this.a.d());
         double var2 = this.a.f();
         return new ThemeColor(var1, var2);
      } else {
         return new ThemeColor(0, 0.0D);
      }
   }

   public void setThemeColor(ThemeColor value) {
      this.a.a(4, zsk.d(value.getColorType()));
      this.a.a(value.getTint());
   }

   public int getColorIndex() {
      return this.a.d() - 8;
   }

   public void setColorIndex(int value) {
      this.a.a(3, value + 8);
   }

   public Color getColor() {
      return this.a.b(this.b);
   }

   public void setColor(Color value) {
      this.a.a(2, value.toArgb());
   }

   public int getArgb() {
      return this.getColor().toArgb();
   }

   public void setArgb(int value) {
      this.setColor(Color.fromArgb(value));
   }

   void a(CellsColor var1, CopyOptions var2) {
      if (var1.b != this.b && !var2.a) {
         this.setColor(var1.getColor());
      } else {
         this.a.f(var1.a);
      }

   }

   int a() {
      return this.a == null ? 100 : (int)zbuc.d((double)this.a.h());
   }

   void a(int var1) {
      this.a.a(zbuc.c((double)var1));
   }

   public double getTransparency() {
      return com.aspose.cells.b.a.zq.b((double)(100 - this.a()) / 100.0D, 2);
   }

   public void setTransparency(double value) {
      this.a((int)(value * 100.0D + 0.5D));
   }

   public void setTintOfShapeColor(double tint) {
      this.a.b(tint);
   }
}
